import { http } from "@/utils/http";
import { baseUrlApi } from "../utils";

export interface Company {
  id: string;
  stockCode: string;
  companyName: string;
}
interface Companylist {
  state: Number;
  msg: string;
  data: [Company];
  success: boolean;
}
//获取公司名称
export const GetCompanyName = () => {
  return http.request<Companylist>(
    "get",
    baseUrlApi("/CompanyDataProperty/GetCompanyName")
  );
};

//获取公司信息
export const GetCompanySpecificInformation = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/CompanyDataProperty/GetCompanySpecificInformation?" + params)
  );
};

//获取财务信息
export const GetCompanyStatement = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/CompanyDataProperty/GetCompanyStatement?" + params)
  );
};
